// router/index.js
import Vue from 'vue';
import Router from 'vue-router';
import TestImportOnDemand1 from '../components/TestImportOnDemand1.vue';
import TestImportOnDemand2 from '../components/TestImportOnDemand2.vue';

Vue.use(Router);

const routes = [
  {
    path: '/testImportOnDemand1',
    name: 'TestImportOnDemand1',
    component: () => import('../components/TestImportOnDemand1.vue'), // 按需加载TestImportOnDemand1组件
  },
  {
    path: '/testImportOnDemand2',
    name: 'TestImportOnDemand2',
    component: () => import('../components/TestImportOnDemand2.vue'), // 按需加载TestImportOnDemand2组件
  },
  // ... 其他路由配置
];

const router = new Router({
  mode: 'history', // 使用HTML5历史模式
  base: process.env.BASE_URL,
  routes,
});

export default router;